﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OutManage.aspx.cs" EnableEventValidation = "false"  Inherits="Comod_OutManage" %>
<%@ Register Src="../usercontrol/PageNavigator.ascx" TagName="PageNavigator" TagPrefix="uc1" %>
<html >
<head id="Head1" runat="server">
<title>商品品牌管理</title>
<link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/changerows.js"></script>
  <script type="text/javascript" src="../js/rl.js"></script>
<script type="text/javascript">
function CheckAll(form) {
    for (var i=0;i<form.elements.length;i++) {
	    var e = form.elements[i];
	    if (e.name != 'chkall' && e.type=='checkbox')
		    e.checked = form.chkall.checked;
    }
}
function AllPrintData(all,yjTm1,yjTm2,txtBarCode,txtmodul,ddlisOut)
{
         window.open("DrawPrint9.aspx?all="+escape(all)+"&yjTm1="+escape(yjTm1)+"&yjTm2="+escape(yjTm2)+"&txtBarCode="+escape(txtBarCode)+"&txtmodul="+escape(txtmodul)+"&ddlisOut="+escape(ddlisOut)+"","","width=1000px,height=800px,left=100px,top=30px,scrollbars=yes");
        return false;

}
function PrintData(id)
{
    if(id!="")
    {

        window.open("DrawPrint.aspx?id="+id,"","width=800px,height=650px,left=100px,top=30px,scrollbars=yes");
        return false;
    }
    return false;
}
</script>

<link href="../js/loading.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" src="../js/loading.js" charset="gb2312"></script>
<body style="text-align: center">
    <form id="form1" runat="server">
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="2%" height="1%">
                    <img src="../images/module.gif" width="20" height="22"></td>
                <td >
                    &nbsp;<asp:Label ID="lblPath" runat="server"></asp:Label></td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
		<table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td  align="right">
                    <img src="../images/search.gif" alt="搜索" width="16" height="16" />出货日期：<asp:TextBox
                        ID="yjTm1" runat="server" CssClass="input1" Width="100px"></asp:TextBox>到<asp:TextBox
                        ID="yjTm2" runat="server" CssClass="input1" Width="100px"></asp:TextBox>客户姓名：<asp:TextBox ID="txtBarCode" runat="server" CssClass="input1" Width="100px"></asp:TextBox>
                    商品型号：<asp:TextBox ID="txtmodul" runat="server" CssClass="input1" Width="100px"></asp:TextBox>
                    出货状态：<asp:DropDownList ID="ddlisOut" runat="server">
                       
                        <asp:ListItem Value="0">未出货</asp:ListItem>
                        <asp:ListItem Value="1">已出货</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Button ID="btnSelec" runat="server" Text="搜索" CssClass="submit" CausesValidation="False"
                        OnClick="btnSelec_Click" /></td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
      </table>
        <asp:GridView ID="GvDataBand" runat="server" CssClass="gridview" Width="99%" AutoGenerateColumns="False" RowStyle-HorizontalAlign="center" EmptyDataText="没有数据" OnRowDataBound="GvDataBand_RowDataBound">
            <Columns>
             <asp:TemplateField HeaderText="单号" Visible="False">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text= '<%#Eval("SalesCode")%>'></asp:Label>
                    </ItemTemplate>
                      <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
               <asp:BoundField DataField="comodBarcode" HeaderText="型号编号" />
                <asp:BoundField DataField="brand" HeaderText="品牌" />
                <asp:BoundField DataField="modul" HeaderText="型号" />
                <asp:BoundField DataField="unit" HeaderText="单位" />
                <asp:BoundField DataField="number" HeaderText="数量" />
                <asp:TemplateField HeaderText="单价(元)">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text= '<%# Bind("prices","{0:f2}") %>'></asp:Label>
                    </ItemTemplate>
                      <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                  <asp:TemplateField HeaderText="金额(元)">
                    <ItemTemplate>
                        <asp:Label ID="Label0" runat="server" Text= '<%# Bind("TotalMoney","{0:f2}") %>'></asp:Label>
                    </ItemTemplate>
                      <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField DataField="guestName" HeaderText="客户名称" />
                <asp:BoundField DataField="GuestMan" HeaderText="联系人" />
                <asp:BoundField DataField="phone" HeaderText="联系电话" />
                <asp:BoundField DataField="address" HeaderText="地址" /> 
                <asp:BoundField DataField="date" HeaderText="出货时间" /> 
                     <asp:TemplateField HeaderText="出货状态" > 
                      <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text= '<%# Bind("IsOut") %>'　　　　　　　　　　　　　　　　></asp:Label>
                        <asp:Label ID="Label4" runat="server" Text= '<%# Bind("Isreturn") %>'></asp:Label>
                    </ItemTemplate>
                      <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
                     <asp:TemplateField HeaderText="操作" > 
                      <ItemTemplate>
                        <asp:LinkButton ID="Label5" runat="server" Text="出货" CommandArgument='<%#Eval("SalesCode") %>' OnClick="Label5_Click"></asp:LinkButton><asp:LinkButton ID="Label6" runat="server" Text="打印" CommandArgument='<%#Eval("SalesCode") %>' OnClick="Label6_Click"></asp:LinkButton>
                    </ItemTemplate>
                      <ItemStyle HorizontalAlign="Center" CssClass="nobr" />
            </asp:TemplateField> 
                        <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <asp:CheckBox ID="ckFlag" runat="server"  />
                    </ItemTemplate>
                    <ItemStyle Width="40px" HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Center" Height="25px" />
            <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" />
        </asp:GridView>
         <table width="99%" border="0" cellspacing="0" cellpadding="0">
        <tr>
        <td style="width: 120px">
          </td>
                <td align="right">
                    <uc1:PageNavigator ID="PageNavigator1" runat="server" DataId="GvDataBand" ConnectionString="connstr" ShowType="Num" PageSize="20" />
                </td>
            <td height="5" align="right">  <input type="checkbox" name="chkall" onClick="CheckAll(this.form)" value="on"><font
                        color="#FF0000">全选</font> <asp:Button ID="btnDel" runat="server" CssClass="submit" OnClick="btnDel_Click" Enabled="false" OnClientClick="return confirm('确定要删除吗?')"
                        Text="删除" />
                <asp:Button ID="Excel" runat="server" CssClass="inputExcel" OnClick="Excel_Click"
                    Text="导出" />
                        <asp:Button ID="Button1" runat="server" CssClass="submit" OnClick="Button1_Click"
                        Text="打印" />
            </td>
      </tr>
      </table>
 <asp:HiddenField ID="HFroid" runat="server" />
    </form>
</body>
</html>
<script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
 senfe("GvDataBand","#ECF9FC","#FFFFFF","#D6F1F8");
--></script>